In order to achieve a certain objective, the robot may perform more than one task. For example, when picking up an object from a person's hand, the robot may extend its arm performing grasping motions, and then raise its arm. When the robot has more than one degree of freedom, there may be multiple solutions to achieve an objective, each solution involving different sets of commands.
Conventionally, a person generates commands for achieving certain objective outside the robot and then programs the robot to perform the tasks as instructed. In generating the commands, the person may consider various factors such as the time before achieving the objective, stability of movements, or whether any self collision in the parts of the robot occurs. Manually programming the robot for each objective, however, is time consuming.